<template>
	<view>
		<view class="card-list-box" v-if="cards && cards.length > 0">
			<view class="card-item" v-for="card in cards" :key="card.id">
				{{card}}
			</view>
		</view>
		<view class="empty">
			<span>亲,咱还没有礼品卡哦，去拍一张吧~</span>
			<button class="btn-buy-card">去拍礼品卡</button>
		</view>
	</view>
</template>

<script>
	import { myCardListApi } from '@/api/giftCard';
	export default {
		data() {
			return {
				cards: []
			}
		},
		methods: {
			async getMyCards(){
				let ret = await myCardListApi()
				if (ret && ret.code == 200) {
					this.cards = ret.data
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
.btn-buy-card{
	width: 240rpx;
	height: 64rpx;
	line-height: 64upx;
	background: #3EB3F3;
	border-radius: 32rpx;
	color: white;
	font-size: 28rpx;
}
</style>
